package juc.safefinal;

/**
 * @ClassName Foo
 * @PackageName juc.safefinal
 * @projectName myThread
 * @Description 
 * @Author games
 * @Date 2025/8/29 上午9:39
 * @Version 1.0
 */
public final class Foo {
    private final int age;
    private final String name;

    private Foo(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public static Foo create(int age, String name) {
        return new Foo(age, name);
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }



}


